import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import echarts from "echarts";
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import './assets/font/font_3832568_pya6c6lqvt/iconfont.css'
import './assets/font/font_3832568_pya6c6lqvt/demo.css'
import '@/styles/index.scss' // global css
import 'remixicon/fonts/remixicon.css'
import App from './App'
import store from './store'
import router from './router'
import Mock from '@/mock'
import JsonViewer from 'vue-json-viewer'
Vue.use(JsonViewer)
// 首先引入element-ui中文包
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import VuePrint from '@/utils/print.js'
Vue.use(VuePrint)
Vue.use(ElementUI, {
  size: 'small',
  locale: {
    el: {
      // 整体覆盖
      ...zhLocale.el,
      pagination: {
        pagesize: '条/页',
        total: `共 {total} 条`,
        goto: '前往',
        pageClassifier: '页'
      },
    }
  }
})

import '@/icons' // icon
import '@/permission' // permission control

if (process.env.NODE_ENV === 'production') {
  const { mockXHR } = require('../mock')
  mockXHR()
}
// set ElementUI lang to EN
Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
// Vue.use(ElementUI)
Vue.prototype.$echarts = echarts;
Vue.config.productionTip = false
import SlideVerify from 'vue-monoplasty-slide-verify';
Vue.use(SlideVerify);
import BaiduMap from 'vue-baidu-map'
Vue.use(BaiduMap, {
  ak: 'A089CnpOKdZ1P0FIMQGZKVYjANfKVvIU'
})
import vueEsign from 'vue-esign'
Vue.use(vueEsign)
new Vue({
  el: '#app',
  beforeCreate() {
    Vue.prototype.$EventBus=this
  },
  router,
  store,
  render: h => h(App)
})
